package cn.web03.websocket.service;

import cn.web03.websocket.dao.SocketMessageRepository;
import cn.web03.websocket.po.SocketMessageT;
import cn.web03.websocket.po.SocketUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
/**
 * @author 零三 2020.06
 * https://web03.cn
 */
@Service
public class SocketMessageServiceImpl implements SocketMessageService {

    @Autowired
    private SocketMessageRepository socketMessageRepository;

    @Override
    public SocketMessageT save(SocketMessageT socketMessageT) {
        return socketMessageRepository.save(socketMessageT);
    }

    @Override
    public List<SocketMessageT> getSocketMessageTByDate(Date date) {
        return socketMessageRepository.getSocketMessageTByDate(date);
    }

    @Override
    public List<SocketMessageT> getSocketMessageTByUser(String launchId, String receiveId, Date date) {
        return socketMessageRepository.getSocketMessageTByUser(launchId,receiveId,date);
    }

    @Override
    public List<String> getSocketUserRelevant(String launchId) {

        return socketMessageRepository.getSocketUserRelevant(launchId);
    }

//    @Override
//    public List<String> getSocketUserReceive(String receiveId) {
//        return socketMessageRepository.getSocketUserReceive(receiveId);
//    }
}
